import axiosInstance from "../axiosInstance";

const shopCart = {
    //添加商品
    addToShopCart({
        fid, count
    }) {
        return axiosInstance.post(
            "/shopCart/addToShopCart", {
            fid, count
        }
        )
    },
    //查询购物车页数
    getListByPage({ pageIndex }) {
        return axiosInstance.get(
            "/shopCart/getListByPage", {
            params: {
                pageIndex
            }
        }
        )
    },
    // 获取购物车商品数量
    getMyShopCartTotalInfo() {
        return axiosInstance.get("/shopCart/getMyShopCartTotalInfo")
    },
    //删除商品
    deleteMyShopCartFoodById(id) {
        return axiosInstance.get("/shopCart/deleteMyShopCartFoodById", {
            params: id
        })
    },
}

export default shopCart